package com.smarttourism.controller;


import com.smarttourism.common.core.domain.R;
import com.smarttourism.domain.RoomStatus;
import com.smarttourism.service.RoomStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/roomStatus")
public class RoomStatusController {
    @Autowired
    private RoomStatusService roomStatusService;
    @GetMapping("/list")
    @PreAuthorize("@ss.hasPermi('room:room:list')")
    public R findList(){
        List<RoomStatus> list = roomStatusService.findAll();
        return list != null?R.ok(list):R.fail("查询失败");

    }
}
